"""videoConfigUrl增加parent_guid字段

Revision ID: ba791c53110e
Revises: 
Create Date: 2025-07-01 17:00:39.438537

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'ba791c53110e'
down_revision: Union[str, Sequence[str], None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('video_config_url')
    op.drop_table('record')
    op.drop_table('video_config_list')
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('video_config_list',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('guid', sa.VARCHAR(), nullable=True),
    sa.Column('startTime', sa.INTEGER(), nullable=True),
    sa.Column('endTime', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('record',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('guid', sa.VARCHAR(), nullable=True),
    sa.Column('episode_guid', sa.VARCHAR(), nullable=True),
    sa.Column('time', sa.INTEGER(), nullable=True),
    sa.Column('create_time', sa.INTEGER(), nullable=True),
    sa.Column('playback_speed', sa.INTEGER(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('video_config_url',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('guid', sa.VARCHAR(), nullable=True),
    sa.Column('url', sa.VARCHAR(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###
